/**
* @file ALErrorChecker.h
* @author Max Ocklind
* @version 2009-12-18
**/


#if !defined(ALERRORCHECKER_H)
#define ALERRORCHECKER_H

/* includes */

#include <sstream>

#include <AL/al.h>
#include <AL/alut.h>

#include "../../../engine/Singleton.h"


/* defines */

// set this to true to redirect the error output to the console
#define AL_DEBUG false


/* classes */

class ALErrorChecker : public Singleton<ALErrorChecker>
{
public:
	void checkALError(const char* who, const char* when);
	void checkALCError(const char* who, const char* when);
	void checkALUTError(const char* who, const char* when);
	void throwError(const char* errType, const char* who, const char* when, const char* errString);

}; /* ALErrorChecker */

#endif /* ALERRORCHECKER_H */